#define _CRT_SECURE_NO_WARNINGS


#include"test_11_8.h"
void bubble_sort(int* p, int x)
{
	int i = 0;
	for ( i = 0; i < x-1; i++)
	{
		int flag = 1;
		int j = 0;
		for ( j = 0; j < x-1-i; j++)
		{
			
			if (p[j] > p[j + 1])
			{
				int tmp = p[j+1];
				p[j + 1] = p[j];
				p[j] = tmp;
				flag = 0;

			}
		}
		if (flag)
			break;
	}
}
void printf_arr(int* p, int sz)
{
	int i = 0;
	for ( i = 0; i < sz; i++)
	{
		printf("%d ", *(p + i));
	}
}
